package com.api.demo.dto.sync;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * @description: 同步订单DTO
 * @author: yanming
 * @createDate: 2022/10/04 10:29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "同步订单DTO")
public class SyncDataOrderDTO extends SyncDataDTO {

    private static final long serialVersionUID = -6554592696173439407L;
    @ApiModelProperty(value = "批次号", required = true)
    @NotBlank(message = "批次号不能为空")
    private String orderId;

    @ApiModelProperty(value = "企业编码", required = true)
    @NotBlank(message = "企业编码不能为空")
    private String companyId;

    @ApiModelProperty(value = "服务商统一信用代码", required = true)
    @NotBlank(message = "服务商统一信用代码不能为空")
    private String taxCreditCode;

    @ApiModelProperty(value = "任务编码", required = true)
    @NotBlank(message = "任务编码不能为空")
    private String taskId;

    @ApiModelProperty(value = "商户支付总额", required = true)
    @NotNull(message = "商户支付总额不能为空")
    private BigDecimal realMoney;

    @ApiModelProperty(value = "总服务费", required = true)
    @NotNull(message = "总服务费不能为空")
    private BigDecimal serviceMoney;

    @ApiModelProperty(value = "发放总金额", required = true)
    @NotNull(message = "发放总金额不能为空")
    private BigDecimal workerMoney;

    @ApiModelProperty(value = "总包支付回单")
    @URL(message = "总包支付回单-链接异常")
    private String turnkeyProjectPayment;

    @ApiModelProperty(value = "分包支付回单")
    @URL(message = "分包支付回单-链接异常")
    private String subPackagePayment;

    @ApiModelProperty(value = "支付方式", required = true)
//    @MaxMinTypeInterface(limitValues = {"OFFLINE", "PABK", "WZBK" ,"ALIPAY","OTHER"}, message = "支付方式，值异常")
    @NotBlank(message = "支付方式不能为空")
    private String paymentMethod;

    @ApiModelProperty(value = "支付时间", required = true)
    @NotBlank(message = "支付时间不能为空")
    private String payDate;

    @ApiModelProperty(value = "创建时间")
    @NotBlank(message = "创建时间不能为空")
    private String createDate;

    @ApiModelProperty(value = "发放明细")
    @NotEmpty(message = "发放明细不能为空")
    private List<SyncDataOrderInfoDTO> orderInfoDTOList;

}